package com.liu.mapper;


import com.liu.entity.Activity;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

@Mapper
@Repository
public interface ActivityMapper {
    /**
     * 根据主键删除
     * @param id
     * @return
     */
    int deleteByPrimaryKey(Integer id);

    /**
     * 添加一个活动
     * @param record
     * @return
     */
    int insert(Activity record);

    /**
     *
     * @param record
     * @return
     */
    int insertSelective(Activity record);

    /**
     * 根据主键查询活动
     * @param id
     * @return
     */
    Activity selectByPrimaryKey(Long id);

    /**
     *
     * @param goodsId
     * @return
     */
    Activity selectByGoodsId(Long goodsId);

    /**
     *
     * @param record
     * @return
     */
    int updateByPrimaryKeySelective(Activity record);

    /**
     * 跟新活动
     * @param record
     * @return
     */
    int updateByPrimaryKey(Activity record);
}